import axios from 'axios'

const request = axios.create({
    baseURL: import.meta.env.APP_BASE_URL,
    timeout: 10000,
})

request.interceptors.request.use( // 请求失败
    config => {
        return config
    },
    error => {
        return Promise.reject(error)
    }
)

request.interceptors.response.use( // 请求成功
    response => {
        return response
    },
    error => {
        return Promise.reject(error)
    }
)